//
//  LQYForgetPasswordView.m
//  BuDeJie
//
//  Created by runone02 on 2018/6/15.
//  Copyright © 2018年 李启云. All rights reserved.
//

#import "LQYForgetPasswordView.h"

@implementation LQYForgetPasswordView


- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI {
    self.iconImage = [[UIImageView alloc]init];
    self.iconImage.backgroundColor = [UIColor redColor];
    [self addSubview: self.iconImage];
    
    [self.iconImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self).with.offset(20);
        make.top.mas_equalTo(self).with.offset(10);
        make.width.height.mas_equalTo(20);
    }];
    
    self.loginNameTF = [[UITextField alloc]init];
    self.loginNameTF.placeholder = @"输入手机号";
    self.loginNameTF.keyboardType = UIKeyboardTypeNumberPad;
    self.loginNameTF.textColor = [UIColor lightGrayColor];
    [self addSubview:self.loginNameTF];
    
    [self.loginNameTF mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.iconImage);
        make.left.mas_equalTo(self.iconImage.mas_right).with.offset(10);
        make.height.mas_equalTo(30);
        make.right.mas_equalTo(self).with.offset(-20);
    }];
    
    self.nextBtn = [[UIButton alloc]init];
    self.nextBtn.backgroundColor = [UIColor redColor];
    [self.nextBtn setTitle:@"下一步" forState:UIControlStateNormal];
    [self.nextBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    
    [self.nextBtn.layer setMasksToBounds:YES];
    [self.nextBtn.layer setCornerRadius:8.0];
    [self.nextBtn.layer setBorderWidth:1.0];
    self.nextBtn.layer.borderColor = [UIColor blackColor].CGColor;
    [self addSubview:self.nextBtn];
    
    [self.nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.loginNameTF.mas_bottom).with.offset(20);
        make.left.mas_equalTo(self).with.offset(30);
        make.right.mas_equalTo(self).with.offset(-30);
        make.height.mas_equalTo(40);
    }];
    
    self.enrollBtn = [[UIButton alloc]init];
    [self.enrollBtn setTitle:@"已有账号?请登录" forState:UIControlStateNormal];
    [self.enrollBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    
    self.enrollBtn.titleLabel.font = TITLE_FONT(32);
    [self addSubview:self.enrollBtn];
    
    [self.enrollBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self);
        make.top.mas_equalTo(self.nextBtn.mas_bottom).with.offset(W_RATIO(25));
        make.left.mas_equalTo(self);
        make.right.mas_equalTo(self);
        make.width.mas_equalTo(20);
    }];
    
}

@end
